<%@ page contentType="text/html; charset=utf-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>懒人家居后台管理</title>
<link href="admin.css" rel="stylesheet" type="text/css" />
<script language="javascript">
function list(id){
	document.location.href='listColors.action?ccatid='+id;
}
</script>
</head>
<body>
<%
	String uri = "listColors.action";
%>
<table width="100%" height="500" class="whiteTable" border="0" cellpadding="0" cellspacing="0" style="white-space:normal;word-break:break-all;">
  <tr>
    <td width="20%" align="left" valign="middle" class="pathBg">&nbsp;&nbsp;调色板管理 &gt;&gt; 颜色列表</td>
    <td width="70%" align="left" valign="middle" class="pathBg">&nbsp;<s:select name="ccatid" theme="simple" list="ccs" listKey="id" listValue="name" required="true" value="#session['ccatid']" onchange="list(this.value)"/></td>
    <td width="10%" align="left" valign="middle"  class="pathBg"><a href="#" onClick="javascript:document.location.href='toAddColors.action';" class="add">添加</a></td>
  </tr>
  <tr>
    <td height="440" colspan="3" align="left" valign="top"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr><td><table border="0" align="left" cellpadding="0" cellspacing="10">
	<s:iterator value="colors" status="color">
	  <s:if test="#color.first||#color.index%7==0">
      <tr>	  </s:if>
        <td height="30" align="left"><table width="100" border="0" cellpadding="0" cellspacing="0" style="padding-top:6px;">
          <tr>
            <td colspan="3" height="80" align="center" valign="middle"><img src="showColor.action?id=<s:property value='id'/>" width="100" height="80"></td>
            </tr>
          <tr>
            <td colspan="3" align="center" valign="middle">&nbsp;<s:property value="name"/></td>
            </tr>
          <tr >
            <td height="20" align="center" valign="middle" class="ColorsImg"><a href="downColors.action?id=<s:property value='id'/>"><img src="images/admin/down.gif"/></a></td>
            <td align="center" valign="middle" class="ColorsImg"><a href="upColors.action?id=<s:property value='id'/>"><img src="images/admin/up.gif"/></a></td>
            <td align="center" valign="middle" class="ColorsImg"><a href="delColors.action?id=<s:property value='id'/>"><img src="images/admin/del.gif"/></a></td>
          </tr>
        </table></td>
		<s:if test="#color.last||(#color.index>0&&#color.index%7==6)">
        </tr>
		</s:if>
		</s:iterator>
		</table></td></tr>
    </table></td>
  </tr>
  <tr>
    <td height="20" colspan="3" align="left" valign="top"><%@ include file="page.jsp"%></td>
  </tr>
</table>
</body>
</html>
